package com.kgc.manager.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.kgc.test.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class UserController {


    @Reference
    private UserService userService;

    @RequestMapping("list")
    public String list(){
        return "list";
    }

    @RequestMapping("login")
    public String login(String name,String pwd){
        if(userService.login(name,pwd))
            return "list";
        else
            return "index";
    }
}
